package com.huatec.service.impl;

import com.huatec.dao.StuClassDao;
import com.huatec.entity.StuClass;
import com.huatec.service.StuClassService;
import com.huatec.dao.StuClassDao;
import com.huatec.service.StuClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class StuClassServiceImpl implements StuClassService {
    @Autowired
    private StuClassDao stuClassDao;

    @Override
    public List<StuClass> queryByPage(int offset, int limit) {
        return stuClassDao.queryAll(offset, limit);
    }

    @Override
    public StuClass queryById(int id) {
        return stuClassDao.queryById(id);
    }

    @Override
    public int delStuClass(int id) {
        int i = stuClassDao.deleteClass(id);
        return i;
    }

    @Override
    public int addStuClass(StuClass stuClass) {
        int i = stuClassDao.addClass(stuClass);
        return i;
    }

    @Override
    public int modifyStuClass(StuClass stuClass) {
        int i = stuClassDao.modifyClass(stuClass);
        return i;
    }
}
